﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BattleThis.Core.Battle
{

	/// <summary>
	/// Descripte the Weapon of a Unit.
	/// </summary>
	public class Weapon
	{

		#region Variablen
		/// <summary>
		/// Defines a empty Weapon.
		/// </summary>
		public readonly static Weapon Empty = new Weapon();
		#endregion

		#region Properties

		/// <summary>
		/// Gets or sets the attack range.
		/// </summary>
		/// <value>
		/// The attack range.
		/// </value>
		public int Range { get; protected set; }

		/// <summary>
		/// Gets or sets the damage.
		/// </summary>
		/// <value>
		/// The Damage the weapon make.
		/// </value>
		public int Damage { get; protected set; }

		#endregion

		#region Methoden

		/// <summary>
		/// Initializes a new instance of the <see cref="Weapon"/> class.
		/// </summary>
		protected Weapon()
		{
			this.Damage = 0;
			this.Range = 0;
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="Weapon"/> class.
		/// </summary>
		/// <param name="range">The range.</param>
		/// <param name="damage">The damage.</param>
		/// <param name="usability">The usability.</param>
		public Weapon( int range, int damage )
		{
			if( range <= 0 ) throw new ArgumentOutOfRangeException( "range <= 0" );
			if( damage <= 0 ) throw new ArgumentOutOfRangeException( "damage <= 0" );

			this.Range = range;
			this.Damage = damage;
		}

		#endregion
	}
}